<div class="editor">
	<span>当前学生：</span><span><{$editorInfo.stname}></span><span>专业：</span><span><{$editorInfo.major}></span><span>班级：</span><span><{$editorInfo.class}></span>
</div>
<hr>
<table name="familyinfo" border="0" cellspacing="1" cellpadding="0" class="table table-bordered table-hover table-striped shittable">
  <tr class="info">
    <td width="17%" height="36" align="center" valign="middle">姓名</td>
    <td width="13%" align="center" valign="middle">关系</td>
    <td width="24%" align="center" valign="middle">工作单位</td>
    <td width="18%" align="center" valign="middle">岗位职务</td>
    <td width="11%" align="center" valign="middle">月收入</td>
    <td width="17%" align="center" valign="middle">联系电话</td>
  </tr>
  <tr>
    <td align="center" valign="middle"><input type="text" name="name" value="<{$familyInfo[0]['name']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="relation" value="<{$familyInfo[0]['relation']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="workplace" value="<{$familyInfo[0]['workplace']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="job" value="<{$familyInfo[0]['job']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="salary" value="<{$familyInfo[0]['salary']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="phone" value="<{$familyInfo[0]['phone']}>"/></td>
  </tr>
  <tr>
    <td align="center" valign="middle"><input type="text" name="name" value="<{$familyInfo[1]['name']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="relation" value="<{$familyInfo[1]['relation']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="workplace" value="<{$familyInfo[1]['workplace']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="job" value="<{$familyInfo[1]['job']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="salary" value="<{$familyInfo[1]['salary']}>"/></td>
    <td align="center" valign="middle"><input type="text" name="phone" value="<{$familyInfo[1]['phone']}>"/></td>
  </tr>

</table>
<center><button class="btn btn-large btn-primary" name="submitFamily">提交数据</button></center>
<script>
	var editorFamily=new PureAjax();
	var subFamily=document.getElementsByName("submitFamily")[0];
	var method1="<{$method|default='create'}>";
	subFamily.onclick=function(){
		editorFamily.post({
			dataType:"text",
			url:URL+"Editor/createNewFamily/sid/<{$editorInfo.sid}>",
			data:{
				name1:document.getElementsByName("name")[0].value,
				name2:document.getElementsByName("name")[1].value,
				relation1:document.getElementsByName("relation")[0].value,
				relation2:document.getElementsByName("relation")[1].value,
				workplace1:document.getElementsByName("workplace")[0].value,
				workplace2:document.getElementsByName("workplace")[1].value,
				job1:document.getElementsByName("job")[0].value,
				job2:document.getElementsByName("job")[1].value,
				salary1:document.getElementsByName("salary")[0].value,
				salary2:document.getElementsByName("salary")[1].value,
				phone1:document.getElementsByName("phone")[0].value,
				phone2:document.getElementsByName("phone")[1].value,
				submit:"yes",
				method:method1
			},
			success:function(data){
				alert(data);
			}
		});
	}
</script>